import axios from '@/utils/axios'
import {PATH_VERSON} from '@/common/constant'
//列表
export const fetchArticleList = data => {
  return axios({
    url: `${PATH_VERSON}/article/list`,
    method: 'post',
    data
  })
}
//类别
export const fetchArticleCates = () => {
  return axios({
    url: `${PATH_VERSON}/article/cate`,
  })
}
//添加、编辑文章
export const fetchAddArticle = data => {
  return axios({
    url: `${PATH_VERSON}/article/add`,
    method: 'post',
    data
  })
}
//删除
export const fetchDelArticle = params => {
  return axios({
    url: `${PATH_VERSON}/article/del`,
    params,
    method:'get'
  })
}

//编辑信息
export const fetchArticleInfo = params => {
  return axios({
    url: `${PATH_VERSON}/article/info`,
    params
  })
}